@section('message-delete')
    <div class="modal fade" id="modal-default" style="padding-top: 15%;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">提示</h4>
                </div>
                <div class="modal-body">
                    <p>确定删除?</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" onclick="delRow()">确定</button>
                </div>
            </div>
        </div>
    </div>
    <script>
        let id = "", url = "";
        let saveId = function (obj) {
            id = $(obj).data("id");
            url = $(obj).data("url");
        };
        let delRow = function () {
            $.ajax({
                url: url,
                type: "DELETE",
                data: {
                    "id": id
                },
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="token"]').attr('value')
                },
                success: function (result) {
                    if (result) {
                        window.location.reload();
                    }
                }
            });
        }
    </script>
@show